/**
 * 销假套件
 */
export const vacationCancelChildren = [
    {
        label: '请假类型',
        formId: 'leaveType',
        tag: 'Input',
        isSummary: true,
        options: {
            disabled: true
        },
        proCondition: true,
        isUsed: false,
        conditionShowOption: { valueMode: 'multiple', showType: 'select', fetchType: 'leave' }
    },
    {
        label: '请选择请假记录',
        formId: 'vacationSelect',
        tag: 'VacationButton',
        extra: '有效范围为发起销假申请的前3个月内，未来不限期',
        rules: [
            {
                required: true,
                message: '请选择请假'
            }
        ],
        options: {
            disabled: true,
            placeholder: '请选择请假'
        }
    },
    {
        label: '开始时间',
        formId: 'startTime',
        tag: 'Date',
        dataType: 'yearTime',
        autofill: true,
        isSummary: true,
        rules: [
            {
                required: false,
                message: '请选择开始时间'
            }
        ],
        options: {
            disabled: true,
            placeholder: '请选择开始时间'
        }
    },
    {
        label: '结束时间',
        formId: 'endTime',
        tag: 'Date',
        dataType: 'yearTime',
        autofill: true,
        isSummary: true,
        rules: [
            {
                required: false,
                message: '请选择开始时间'
            }
        ],
        options: {
            disabled: true,
            placeholder: '请选择开始时间'
        }
    },
    {
        label: '时长',
        formId: 'duration',
        tag: 'Duration',
        autofill: true,
        extra: '审批通过后请假时长将自动从考勤统计销除',
        rules: [
            {
                required: true,
                message: '请选择开始时间'
            }
        ],
        options: {
            disabled: true,
            placeholder: '选择时间后自动计算'
        },
        proCondition: true,
        isUsed: false,
        conditionShowOption: { showType: 'number' },
        inFormAuth: false
    }
];

export const leaveCancelControl = {
    label: '销假申请',
    cmpType: 'custom',
    formId: '',
    key: 'LeaveCancel',
    tag: 'LeaveCancel',
    children: vacationCancelChildren,
    proCondition: true,
    isUsed: false
};
